package com.feditory.common.domain;

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.feditory.util.DateUtils;

@Embeddable
public class DataHandleStatus {

	@Column(name = "USE_YN", nullable = false)
	private boolean useYn;

	@Column(name = "REGISTER_DATE_TIME", nullable = false, length = 14)
	private String registerDateTime;

	@Column(name = "UPDATE_DATE_TIME", nullable = false, length = 14)
	private String updateDateTime;

	public static DataHandleStatus getNewDataHandler() {
		DataHandleStatus status = new DataHandleStatus();
		status.setRegisterDateTime(DateUtils.getCurrentBaseDateString());
		status.setUpdateDateTime(DateUtils.getCurrentBaseDateString());
		status.setUseYn(true);
		return status;
	}

	public DataHandleStatus() {

	}

	public boolean isUseYn() {
		return useYn;
	}

	public void setUseYn(boolean useYn) {
		this.useYn = useYn;
	}

	public String getRegisterDateTime() {
		return registerDateTime;
	}

	public void setRegisterDateTime(String registerDateTime) {
		this.registerDateTime = registerDateTime;
	}

	public String getUpdateDateTime() {
		return updateDateTime;
	}

	public void setUpdateDateTime(String updateDateTime) {
		this.updateDateTime = updateDateTime;
	}

}
